Repository navigation
fix(pdf-engine): an element the marking reads as setting no ink is stated empty by the instrument too - #703
Conversation
…tated empty by the instrument (red)
An `\index{…}` and a `\color[HTML]{…}` in a paragraph: the marking (classOf) reads each as setting no ink and gives it no mark,
the class table reads it as `other`, an inked class, and the instrument states it nothing, so the typesetter leaves its unit
unproven. Red on the line for the two (the model and the TeX test in the pinned image); the controls green: a paper's macro,
an alignment tab, a \rule in a box, a tie and a forced break, a paper's own \index, a register's setting read as a macro.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ated empty by the instrument too inklessPieces stated empty only a text macro of the marking's null. It now states empty every placeholder the marking reads as setting no ink by TeX's own tables (marks.ts INVISIBLE, source/arg-roles.ts textless, as classOf reads its source), whatever class the element carries, where that class is one drawn from its ink (locate/work.ts INKED_CLASSES): an `\index` or a `\color` with a model, which the class table reads as `other`, is drawn as nothing, proven, and its unit is laid. Of the marking's null, STRUCTURE (an alignment's tab: a table's rows read as prose) and a forced break keep their statements; a paper's macro, a \rule the probe asks about, keep theirs. The marking and the compile are untouched (no TeX moves). PDF-READER §18.120, CHANGELOG. PIPELINE moves at merge (bundles' El.text on those elements; units newly laid). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion of what sets no ink, with its reason Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, a cell head's colour stated empty Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
| const noInkRead = marked === null && (INVISIBLE.test(p.src ?? '') || textless(p.src ?? '')) | ||
| if ((marked === 'macro' && noInk.has(p.src)) || (noInkRead && cls !== undefined && INKED_CLASSES.has(cls))) |
There was a problem hiding this comment.
🟡 Missing marks from redefined index commands
When a paper redefines \index to print a dagger, inklessPieces still declares the call empty. The ownership pass accepts the dagger as paragraph text because its spelling check ignores punctuation. The translated paragraph hides that text without redrawing the dagger.
Learn more
The source walker keeps a custom macro call as a placeholder when it cannot extract prose from its arguments. classOf still skips marking a call named \index, regardless of that definition. The spelling check ignores punctuation, so an inline dagger with no marks of its own can belong to the paragraph's text. geometry now sets El.text to an empty string for the placeholder, and element reading treats that as proof that the translation need not redraw anything. Before the change, the missing element ink left the paragraph unproven and the original visible.
Example: A paper saves the normal \index as \oldindex, then defines \renewcommand{\index}[1]{\oldindex{#1}\textdagger}. The original adds a dagger after result\index{selected result}. The translated paragraph omits it.
Recommended fix: Carry a source-reader fact that distinguishes calls using the known ink-free meaning from calls resolved to a paper's own definition. Use that fact for the new static empty inference; leave overrides to TeX-backed evidence. Add a regression that contrasts stock \index with a wrapper that adds visible punctuation.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Real, and the one thing this change must never do: a paper that redefines \index so that it prints had the call stated empty, so the glyph TeX sets there would go with the paragraph and never be drawn. Shown red first in the model test and in the pinned image (abfd567), fixed in 67b8399: a command the paper itself defines is never stated empty by its spelling (the source reader's own reading of the paper's definitions decides). Counted over both corpora: none of the units this change lays stands at such a command. The marking reads these names by spelling too; that is recorded for the compile-side work and nothing here builds on it.
| it('a \\color declaration the class table reads as setting nothing is stated empty too (no other reading moves)', () => { | ||
| const r = stated(`${WORDS} {\\color{red} red words of ours} and more words after it.`, '\\usepackage{xcolor}\n') | ||
| expect(r.at('\\color')).toMatchObject({ marking: null, cls: 'zero' }) |
There was a problem hiding this comment.
There was a problem hiding this comment.
Right: the control passed even if the instrument had stated a zero element empty. It now asserts that nothing is stated for it (empty: false), in the fix round's commits.
Rules gate: passedModel tier of the layer gate on 32 outputs of 7 targets, The rule set changes no target. No output for zh-TW, pt, it, nl, pl, tr, id, ms, cs, sv, uk, bg: their rules are not measured here. de: 5 outputs, no measure moved
es: 4 outputs, no measure moved
fr: 4 outputs, no measure moved
ja: 4 outputs, no measure moved
ko: 4 outputs, no measure moved
ru: 4 outputs, no measure moved
zh: 7 outputs, no measure moved
The links open the lab on a machine that has the fixtures. No page and no text of a paper is shown here: the papers are under arXiv's licence. |
…stated empty by its spelling (red)
The marking reads `\index` by its spelling and gives it no mark; a paper that redefines it to print a dagger (its argument
unused, so the source reader keeps the call a placeholder) has its call stated empty by the instrument, and the dagger TeX
sets would be erased with the paragraph's text and drawn by nothing. Red at the head for `\renewcommand{\index}` (the model
and the TeX test in the pinned image, which shows TeX sets the dagger); a `\let\index` and a textless command defined anew,
controls. The named colour's control now asserts that it is stated nothing (review on #703).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n: the instrument states it empty by no spelling The marking reads `\index` (and every name of INVISIBLE and the textless table) by its spelling. Where the paper defines the command (ownCommandsOf: arg-roles.ts paperOf over its TeX files, the source reader's own reading of its definitions), it is read by its definition, which may set ink: inklessPieces no longer states it empty, so its unit stays unproven as on the line. With the paper's files not given, none of this reading is made. The text macro of the marking's null keeps the line's statement (a class's own \newblock, defined in many papers' files, sets no ink). Over the 245 and the 599 no unit E1 lays stands at a command its paper defines. PDF-READER §18.120. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s own command by its definition, with its reason Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
Conflicts: CHANGELOG.md (both entries kept, this branch's first); lab/release-check/census-ledger.json (the line's taken, the census measured on the merged tree and recorded: productCode +22 with its reason). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
The line's 103 commits since 950b9f8 (#703 to #709: F4's fixes, the links of bare words, the LLM translator's settlement fix, the previews' five interaction fixes, the harness in two CI jobs) taken into link previews' phase 2. Conflicts, each resolved by reading both sides: - docs/PDF-READER.md (§20.7, the sheet): this branch's buttons (the cited paper's, the search, the go-to; an arXiv address's tap) and the line's rule that a link inside the paper whose sheet has nothing to show jumps: both stated. - packages/reader/src/preview/sheet.ts: a tap whose sheet has nothing to show does what its link does: a link out opens its address (this branch), a link inside the paper jumps as the go-to button would (the line's fix); the header both, in the line's wording. - packages/reader/tests/preview/sheet.test.ts: setUp takes both options (`href`/`card` and `empty`); both sides' tests kept. - packages/reader/src/preview/card.ts, previews.ts: header comments, this branch's phase 2 content in the line's wording (no history notes). - packages/reader/e2e/fixtures/README.md: this branch's s5-links row (its citation file) and the line's s5-bare row. - lab/pdf/reader-fixtures/make.mjs: s5-links takes the line's id 2600.00012 and keeps this branch's citation records; s5-links/cites.json made again by the maker (its paper 2600.00012v1; every other output of the maker byte-identical to the line's). - lab/release-check/census-ledger.json: the line's, as written; this branch's rises are recorded again against it by the census's raise command in a commit of their own. Versions after the merge: PIPELINE_VERSION '133', LAYOUT '50', TRANSLATE_VERSION '11' (the line's); CITE_RULE 3, CITES_FORMAT 1 (this branch's). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What a reader saw
A paragraph, a caption or a theorem holding an index entry (
word\index{word}) or a colour given by a model(
\color[HTML]{3366AA}) stayed in the original language: the reader's lay held itunproven.Why
The marking (
marks/marks.tsclassOf) reads such a placeholder as setting no ink by TeX's own tables (INVISIBLE:\index,\color,\label, a skip, a kern;source/arg-roles.tstextless: a register's or a length's setting) and gives it no mark,so no compile states its places. The class table (
classesOf) reads these two asother, a class drawn from its ink(
locate/work.tsINKED_CLASSES). The instrument stated empty only a text macro of the marking's null (inklessPieces), so thelocate found no ink for the element and stated nothing, and the typesetter read an inked element whose ink was not found.
The change
One classification for both readers (
instrument/instrument.tsinklessPieces): a placeholder the marking reads as settingno ink (
INVISIBLEortextless, read from its source asclassOfreads it) is stated empty, whatever class the elementcarries, where that class is one drawn from its ink. The locate then states it
text: '', drawn as nothing, proven.What
unprovenprotects is kept. It keeps out a unit whose element may set ink the text group erases and nothing drawsagain. These set none by TeX's definition; a paper's own
\indexor\coloris read by its definition in force (one thatsets its argument is text, no placeholder). Of the marking's null, an alignment's tab, a stray brace, a parameter or a script
mark (
STRUCTURE) and a forced break keep their statements (a table's rows read as prose would be laid as prose over a table).A paper's macro, a
\rulethe probe asks about, and a register's setting the source reader keeps with the command after itstay unproven where their ink is not found. Each is a control test.
Tests (red first)
packages/engine/tests/every-element-stated.test.ts(openPaper, classesOf, inklessPieces on our own TeX):\indexand\color[HTML]stated empty, red on the line (2 of 9); the controls green before and after.tests/pdf-reader/every-element-stated-tex.test.ts(pinned TeX Live image, offline): the marked original as the preparemakes it, its instrument states both empty (red on the line), and TeX sets the same text items with and without them.
Proof
and located dump the line's, in all 245 papers (none holds a placeholder the change states empty): 0 units, parts or
outcomes moved.
outside the compile key): outcomes equal;
unproven144 units (37 papers) -> 88 (35); the units that moved: 56unproven-> drawn, nothing else; no other cause rose or fell. 543 papers byte for byte; 4 moved, their parts alone(units objects and prepare dumps the line's): 175 elements gain
text: '', and five of them, a\colorat a table cell'shead, were stated as set before the cell's start (
keep) and are now stated empty: drawn as nothing either way, no unitof theirs moved. Elements newly not found 0, members newly
unproven0, alignments, line measures and separations moved 0.compile side's bundle).
(902 files), the hosted-CI form 0, build 0,
pnpm e2e:reader104/104, the reader package's e2e harness 115/115; the TeXtest in the pinned image 1/1.
Versions
PIPELINE moves at merge (the bundles'
El.texton those elements; units newly laid, their rows asked): the number is theline's at merge. LAYOUT, TRANSLATE, FORMAT unchanged. No compile key moves: the instrument is outside the compile side's
closure (the website's marks digest is the same at the line and at this head). PDF-READER §18.120, CHANGELOG.
🤖 Generated with Claude Code